Regression analysis

library(readxl)
library(dplyr)
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(devtools)
## Loading required package: usethis
library(tidyverse)
## ── Attaching packages ─────────────────────────────────────── tidyverse 1.3.2
## ──
## ✔ ggplot2 3.4.0     ✔ purrr   1.0.1
## ✔ tibble  3.1.8     ✔ stringr 1.5.0
## ✔ tidyr   1.3.0     ✔ forcats 1.0.0
## ✔ readr   2.1.3     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag()    masks stats::lag()
library(ggplot2)
library(GGally)
## Registered S3 method overwritten by 'GGally':
##   method from   
##   +.gg   ggplot2
library(writexl)

df <- read_excel("data_2010.xlsx")

z-score function

z_score <- function(x){
  zscore=(x - mean(x, na.rm = TRUE))/sd(x, na.rm = TRUE)
zscore
}

##Plotting ## Causality_log and Property Damage log

################### causality  plot ################################
causality <- ggplot(df, aes(causality_log))
causality + geom_histogram(binwidth = 0.8)  ### left-skewed  

################### Property Damage log ################################
property_damage_log<- ggplot(df, aes(prop_dmg_log))
property_damage_log + geom_histogram(binwidth = 1)  

CAUSALITY

Social Dimension and Causality

### social dimension  VS causality log normalized plot
cor.test(df$causality_log, df$per_white_norm) #okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_white_norm
## t = -9.7569, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2059080 -0.1378224
## sample estimates:
##        cor 
## -0.1720707
cor.test(df$causality_log, df$per_black_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_black_norm
## t = 7.8494, df = 3120, p-value = 5.699e-15
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1045898 0.1733932
## sample estimates:
##       cor 
## 0.1391595
cor.test(df$causality_log, df$per_hispanic_alone_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_hispanic_alone_norm
## t = 4.5224, df = 3120, p-value = 6.343e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.04574858 0.11545264
## sample estimates:
##        cor 
## 0.08069927
cor.test(df$causality_log, df$per_asian_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_asian_norm
## t = 13.719, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2051503 0.2713240
## sample estimates:
##      cor 
## 0.238514
cor.test(df$causality_log, df$per_american_indian_norm)# no
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_american_indian_norm
## t = -0.95846, df = 3120, p-value = 0.3379
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.05220547  0.01793432
## sample estimates:
##         cor 
## -0.01715668
cor.test(df$causality_log, df$per_other_races_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_other_races_norm
## t = 6.5186, df = 3120, p-value = 8.246e-11
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08116485 0.15038371
## sample estimates:
##      cor 
## 0.115915
cor.test(df$causality_log, df$per_POC_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_POC_norm
## t = 11.606, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1695715 0.2368315
## sample estimates:
##       cor 
## 0.2034415
df$per_hispanic_norm <- df$per_hispanic_alone_norm # since i had it with the wrong name

cor.test(df$causality_log, df$per_elderly_norm) # okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_elderly_norm
## t = -12.7, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2548129 -0.1880973
## sample estimates:
##        cor 
## -0.2217145
cor.test(df$causality_log, df$per_young_dependent_norm)  #okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_young_dependent_norm
## t = 7.3903, df = 3120, p-value = 1.871e-13
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.09652919 0.16548400
## sample estimates:
##       cor 
## 0.1311652
cor.test(df$causality_log, df$per_noenglish_norm)# #okay but removed due to correlation with hisp and foreign born
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_noenglish_norm
## t = 5.2262, df = 3120, p-value = 1.844e-07
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.05826757 0.12781986
## sample estimates:
##        cor 
## 0.09315736
cor.test(df$causality_log, df$per_foreign_born_norm)##okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_foreign_born_norm
## t = 13.499, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2014822 0.2677757
## sample estimates:
##       cor 
## 0.2349021
cor.test(df$causality_log, df$per_female_hh_with_kids_under6_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_female_hh_with_kids_under6_norm
## t = 7.3962, df = 3120, p-value = 1.792e-13
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.09663166 0.16558461
## sample estimates:
##       cor 
## 0.1312669
cor.test(df$causality_log, df$per_female_hh_with_kids_under18_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_female_hh_with_kids_under18_norm
## t = 13.899, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2081469 0.2742213
## sample estimates:
##      cor 
## 0.241464
cor.test(df$causality_log, df$per_rural_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_rural_norm
## t = -21.655, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.3915882 -0.3305853
## sample estimates:
##        cor 
## -0.3614735
cor.test(df$causality_log, df$per_per_no_school_completed_norm) #not statistically significant
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_per_no_school_completed_norm
## t = 1.0548, df = 3120, p-value = 0.2916
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.01621006  0.05392538
## sample estimates:
##        cor 
## 0.01888088
X<-df%>%
  select(
         per_black_norm,
              per_hispanic_norm,
                       per_asian_norm,
         per_elderly_norm,
         per_young_dependent_norm,
         per_foreign_born_norm,
         per_female_hh_with_kids_under6_norm,
         per_rural_norm) 
        
ggpairs(X)

social_causality <- lm(causality_log~(per_black_norm+per_hispanic_norm + per_asian_norm + per_elderly_norm+per_young_dependent_norm+per_foreign_born_norm+per_female_hh_with_kids_under6_norm+per_rural_norm)+
                       log_pop_2010+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(social_causality)
## 
## Call:
## lm(formula = causality_log ~ (per_black_norm + per_hispanic_norm + 
##     per_asian_norm + per_elderly_norm + per_young_dependent_norm + 
##     per_foreign_born_norm + per_female_hh_with_kids_under6_norm + 
##     per_rural_norm) + log_pop_2010 + numb_haz_log + state, data = df, 
##     na.rm = TRUE)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.5039 -0.6250 -0.1441  0.4629  5.1027 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                         -3.177038   0.306206 -10.376  < 2e-16 ***
## per_black_norm                       0.035972   0.029796   1.207 0.227430    
## per_hispanic_norm                   -0.161459   0.054662  -2.954 0.003163 ** 
## per_asian_norm                      -0.048704   0.036761  -1.325 0.185299    
## per_elderly_norm                     0.062523   0.025727   2.430 0.015146 *  
## per_young_dependent_norm             0.004299   0.024371   0.176 0.859982    
## per_foreign_born_norm                0.104558   0.038861   2.691 0.007172 ** 
## per_female_hh_with_kids_under6_norm -0.029584   0.025234  -1.172 0.241142    
## per_rural_norm                       0.013418   0.032629   0.411 0.680927    
## log_pop_2010                         0.390194   0.024473  15.944  < 2e-16 ***
## numb_haz_log                         0.441605   0.040711  10.847  < 2e-16 ***
## stateAL                              0.320714   0.266098   1.205 0.228200    
## stateAR                             -0.325780   0.258484  -1.260 0.207640    
## stateAZ                              0.170689   0.348279   0.490 0.624103    
## stateCA                             -0.102406   0.266322  -0.385 0.700621    
## stateCO                             -0.057444   0.261938  -0.219 0.826428    
## stateCT                             -0.958871   0.413877  -2.317 0.020580 *  
## stateDE                             -0.012768   0.599739  -0.021 0.983016    
## stateFL                             -0.579724   0.270948  -2.140 0.032465 *  
## stateGA                             -0.711840   0.246974  -2.882 0.003976 ** 
## stateIA                             -0.904433   0.251602  -3.595 0.000330 ***
## stateID                             -0.769238   0.271372  -2.835 0.004618 ** 
## stateIL                             -0.486117   0.250716  -1.939 0.052603 .  
## stateIN                             -0.762539   0.251577  -3.031 0.002458 ** 
## stateKS                             -0.428265   0.248337  -1.725 0.084713 .  
## stateKY                             -0.483859   0.244558  -1.978 0.047962 *  
## stateLA                             -0.578424   0.265763  -2.176 0.029596 *  
## stateMA                             -0.896625   0.349796  -2.563 0.010416 *  
## stateMD                             -0.924671   0.306861  -3.013 0.002605 ** 
## stateME                             -1.205569   0.335201  -3.597 0.000328 ***
## stateMI                             -1.110460   0.257202  -4.317 1.63e-05 ***
## stateMN                             -0.987211   0.251415  -3.927 8.80e-05 ***
## stateMO                             -0.209956   0.246672  -0.851 0.394752    
## stateMS                             -0.173503   0.264834  -0.655 0.512426    
## stateMT                             -0.188918   0.262516  -0.720 0.471799    
## stateNC                             -0.600870   0.256573  -2.342 0.019249 *  
## stateND                             -0.577330   0.266316  -2.168 0.030248 *  
## stateNE                             -0.497563   0.252103  -1.974 0.048511 *  
## stateNH                             -0.328842   0.382154  -0.860 0.389583    
## stateNJ                              0.114843   0.317615   0.362 0.717692    
## stateNM                             -0.024243   0.303180  -0.080 0.936274    
## stateNV                             -0.131066   0.325751  -0.402 0.687453    
## stateNY                             -0.987004   0.264992  -3.725 0.000199 ***
## stateOH                             -1.188385   0.254934  -4.662 3.27e-06 ***
## stateOK                              0.019627   0.254951   0.077 0.938641    
## stateOR                             -0.659248   0.282550  -2.333 0.019701 *  
## statePA                             -1.028727   0.265753  -3.871 0.000111 ***
## stateRI                             -1.734217   0.533312  -3.252 0.001159 ** 
## stateSC                             -0.717425   0.281728  -2.547 0.010929 *  
## stateSD                             -0.315558   0.255665  -1.234 0.217199    
## stateTN                             -0.582580   0.252468  -2.308 0.021091 *  
## stateTX                             -0.355159   0.248567  -1.429 0.153155    
## stateUT                              0.052900   0.293830   0.180 0.857135    
## stateVA                             -0.844892   0.248362  -3.402 0.000678 ***
## stateVT                             -0.965817   0.344152  -2.806 0.005042 ** 
## stateWA                             -0.722398   0.277995  -2.599 0.009405 ** 
## stateWI                             -0.787504   0.258328  -3.048 0.002320 ** 
## stateWV                             -0.984334   0.265909  -3.702 0.000218 ***
## stateWY                             -0.044492   0.303361  -0.147 0.883408    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9496 on 3063 degrees of freedom
## Multiple R-squared:  0.3566, Adjusted R-squared:  0.3444 
## F-statistic: 29.27 on 58 and 3063 DF,  p-value: < 2.2e-16

Economic Dimension and Causality

### economic dimension  VS causality log normalized plot

cor.test(df$causality_log, df$per_below_poverty_norm) # not statistically significant
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_below_poverty_norm
## t = -0.61014, df = 3120, p-value = 0.5418
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.04598514  0.02416692
## sample estimates:
##         cor 
## -0.01092255
cor.test(df$causality_log, df$median_hh_income_2010_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$median_hh_income_2010_norm
## t = 9.1914, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1280183 0.1963312
## sample estimates:
##       cor 
## 0.1623693
cor.test(df$causality_log, df$per_rent_norm)# okay but removed do to correlation with no car
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_rent_norm
## t = 13.309, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1983111 0.2647068
## sample estimates:
##       cor 
## 0.2317789
cor.test(df$causality_log, df$per_no_carnorm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_no_carnorm
## t = -11.308, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2318929 -0.1644917
## sample estimates:
##        cor 
## -0.1984269
cor.test(df$causality_log, df$per_college_or_higher_norm)# okay but removed due to correlation with hh income
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_college_or_higher_norm
## t = 13.436, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2004345 0.2667620
## sample estimates:
##       cor 
## 0.2338703
cor.test(df$causality_log, df$average_hh_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$average_hh_norm
## t = 7.7984, df = 3120, p-value = 8.479e-15
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1036959 0.1725166
## sample estimates:
##       cor 
## 0.1382732
cor.test(df$causality_log, df$per_lack_plumbing_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_lack_plumbing_norm
## t = -2.2011, df = 3120, p-value = 0.0278
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.074353748 -0.004301982
## sample estimates:
##         cor 
## -0.03937625
cor.test(df$causality_log, df$per_lack_kitchen_norm) #okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_lack_kitchen_norm
## t = -9.5853, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2030074 -0.1348516
## sample estimates:
##        cor 
## -0.1691317
cor.test(df$causality_log, df$per_mobile_home_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_mobile_home_norm
## t = -4.2332, df = 3120, p-value = 2.37e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.11035818 -0.04059795
## sample estimates:
##         cor 
## -0.07557053
cor.test(df$causality_log, df$per_unemployed_norm)## okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_unemployed_norm
## t = 8.7904, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1210399 0.1895068
## sample estimates:
##     cor 
## 0.15546
X<-df%>%
  select(
         per_no_carnorm,
         median_hh_income_2010_norm,
         average_hh_norm,
         per_lack_plumbing_norm,
         per_lack_kitchen_norm,
         per_mobile_home_norm,
         per_unemployed_norm) 
        
ggpairs(X)

econ_causality <- lm(causality_log~(
         per_no_carnorm+median_hh_income_2010_norm+average_hh_norm+
         per_lack_plumbing_norm+per_lack_kitchen_norm+
         per_mobile_home_norm+per_unemployed_norm)+
                        log_pop_2010+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(econ_causality)
## 
## Call:
## lm(formula = causality_log ~ (per_no_carnorm + median_hh_income_2010_norm + 
##     average_hh_norm + per_lack_plumbing_norm + per_lack_kitchen_norm + 
##     per_mobile_home_norm + per_unemployed_norm) + log_pop_2010 + 
##     numb_haz_log + state, data = df, na.rm = TRUE)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.5104 -0.6204 -0.1358  0.4699  5.0038 
## 
## Coefficients:
##                              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                -3.3861588  0.3223726 -10.504  < 2e-16 ***
## per_no_carnorm             -0.0414919  0.0215498  -1.925  0.05427 .  
## median_hh_income_2010_norm  0.0730351  0.0287588   2.540  0.01115 *  
## average_hh_norm            -0.1212188  0.0242137  -5.006 5.87e-07 ***
## per_lack_plumbing_norm     -0.0248460  0.0268350  -0.926  0.35458    
## per_lack_kitchen_norm       0.0678691  0.0256898   2.642  0.00829 ** 
## per_mobile_home_norm        0.0229197  0.0269185   0.851  0.39459    
## per_unemployed_norm         0.0618163  0.0252373   2.449  0.01437 *  
## log_pop_2010                0.3760709  0.0199066  18.892  < 2e-16 ***
## numb_haz_log                0.4554903  0.0404987  11.247  < 2e-16 ***
## stateAL                     0.6882991  0.3055490   2.253  0.02435 *  
## stateAR                     0.0212880  0.3009603   0.071  0.94361    
## stateAZ                     0.5132597  0.3651433   1.406  0.15993    
## stateCA                     0.1891042  0.3000959   0.630  0.52865    
## stateCO                     0.1282804  0.2979590   0.431  0.66684    
## stateCT                    -0.6358297  0.4333707  -1.467  0.14243    
## stateDE                     0.4233034  0.6151623   0.688  0.49143    
## stateFL                    -0.1422031  0.3095652  -0.459  0.64601    
## stateGA                    -0.3119362  0.2918722  -1.069  0.28527    
## stateIA                    -0.5053658  0.2973231  -1.700  0.08929 .  
## stateID                    -0.3231649  0.3137847  -1.030  0.30314    
## stateIL                    -0.1346395  0.2950242  -0.456  0.64816    
## stateIN                    -0.3930954  0.2969107  -1.324  0.18562    
## stateKS                    -0.0572892  0.2940989  -0.195  0.84557    
## stateKY                    -0.1482506  0.2923074  -0.507  0.61207    
## stateLA                    -0.1975775  0.3037323  -0.650  0.51542    
## stateMA                    -0.5580614  0.3747204  -1.489  0.13652    
## stateMD                    -0.5270512  0.3354717  -1.571  0.11627    
## stateME                    -0.8955222  0.3651165  -2.453  0.01423 *  
## stateMI                    -0.7783866  0.3031774  -2.567  0.01029 *  
## stateMN                    -0.5980852  0.2971311  -2.013  0.04422 *  
## stateMO                     0.1646739  0.2928636   0.562  0.57396    
## stateMS                     0.2467886  0.3019792   0.817  0.41386    
## stateMT                     0.1009132  0.3014277   0.335  0.73781    
## stateNC                    -0.2388775  0.2991553  -0.799  0.42464    
## stateND                    -0.1936113  0.3097492  -0.625  0.53198    
## stateNE                    -0.1023200  0.2967725  -0.345  0.73029    
## stateNH                     0.0003921  0.4069369   0.001  0.99923    
## stateNJ                     0.5450307  0.3435431   1.586  0.11273    
## stateNM                    -0.0080808  0.3188830  -0.025  0.97978    
## stateNV                     0.0907099  0.3592581   0.252  0.80068    
## stateNY                    -0.6102058  0.3042849  -2.005  0.04501 *  
## stateOH                    -0.8383211  0.2973947  -2.819  0.00485 ** 
## stateOK                     0.3722527  0.2992051   1.244  0.21354    
## stateOR                    -0.3649208  0.3187720  -1.145  0.25239    
## statePA                    -0.6551946  0.3037124  -2.157  0.03106 *  
## stateRI                    -1.3993684  0.5479918  -2.554  0.01071 *  
## stateSC                    -0.3550726  0.3168513  -1.121  0.26253    
## stateSD                     0.0439281  0.3014806   0.146  0.88416    
## stateTN                    -0.2187329  0.2977910  -0.735  0.46269    
## stateTX                    -0.0721471  0.2818921  -0.256  0.79802    
## stateUT                     0.6441839  0.3343267   1.927  0.05410 .  
## stateVA                    -0.4781443  0.2857243  -1.673  0.09434 .  
## stateVT                    -0.6655584  0.3750534  -1.775  0.07607 .  
## stateWA                    -0.3921607  0.3168305  -1.238  0.21590    
## stateWI                    -0.4444524  0.2991139  -1.486  0.13741    
## stateWV                    -0.6199811  0.3097681  -2.001  0.04543 *  
## stateWY                     0.1747456  0.3370993   0.518  0.60423    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9473 on 3064 degrees of freedom
## Multiple R-squared:  0.3595, Adjusted R-squared:  0.3476 
## F-statistic: 30.18 on 57 and 3064 DF,  p-value: < 2.2e-16

Health Dimension and Causality

cor.test(df$causality_log, df$life_expectancy_2010_norm) # okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$life_expectancy_2010_norm
## t = -2.9141, df = 3120, p-value = 0.003593
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.08702054 -0.01705033
## sample estimates:
##         cor 
## -0.05209937
cor.test(df$causality_log, df$per_hypertension_2009_norm)# no
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_hypertension_2009_norm
## t = -0.39005, df = 3120, p-value = 0.6965
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.04205268  0.02810432
## sample estimates:
##          cor 
## -0.006982771
cor.test(df$causality_log, df$per_diabetes_2010_norm)#okay removed due to high correlation
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_diabetes_2010_norm
## t = 2.6552, df = 3120, p-value = 0.007968
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.01242173 0.08242417
## sample estimates:
##        cor 
## 0.04748125
cor.test(df$causality_log, df$per_disability_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_disability_norm
## t = 0.98026, df = 3120, p-value = 0.327
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.01754416  0.05259468
## sample estimates:
##        cor 
## 0.01754685
cor.test(df$causality_log, df$per_nursingnorm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$per_nursingnorm
## t = -9.888, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2081217 -0.1400906
## sample estimates:
##        cor 
## -0.1743142
#cor.test(df$causality_norm_log, df$per_institutionalized_norm)## OKAY



X<-df%>%
  select(life_expectancy_2010_norm,
            per_disability_norm,
         per_nursingnorm) 
        
ggpairs(X)

health_causality <- lm(causality_log~(life_expectancy_2010_norm+
         per_disability_norm+
         per_nursingnorm)+
                        log_pop_2010+numb_haz_norm+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(health_causality)
## 
## Call:
## lm(formula = causality_log ~ (life_expectancy_2010_norm + per_disability_norm + 
##     per_nursingnorm) + log_pop_2010 + numb_haz_norm + state, 
##     data = df, na.rm = TRUE)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.3647 -0.6309 -0.1352  0.4613  4.8914 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)    
## (Intercept)               -2.273941   0.259287  -8.770  < 2e-16 ***
## life_expectancy_2010_norm -0.038090   0.025191  -1.512 0.130625    
## per_disability_norm        0.024030   0.018281   1.314 0.188777    
## per_nursingnorm            0.001919   0.019555   0.098 0.921821    
## log_pop_2010               0.349885   0.016035  21.821  < 2e-16 ***
## numb_haz_norm              0.261261   0.020596  12.685  < 2e-16 ***
## stateAL                    0.559947   0.245636   2.280 0.022701 *  
## stateAR                   -0.166654   0.242791  -0.686 0.492507    
## stateAZ                    0.305168   0.326299   0.935 0.349738    
## stateCA                    0.066472   0.250537   0.265 0.790783    
## stateCO                    0.117842   0.245331   0.480 0.631021    
## stateCT                   -0.600854   0.400839  -1.499 0.133979    
## stateDE                    0.306798   0.588570   0.521 0.602223    
## stateFL                   -0.254054   0.244619  -1.039 0.299086    
## stateGA                   -0.507924   0.227047  -2.237 0.025352 *  
## stateIA                   -0.706420   0.238273  -2.965 0.003053 ** 
## stateID                   -0.566300   0.257241  -2.201 0.027779 *  
## stateIL                   -0.268606   0.234525  -1.145 0.252166    
## stateIN                   -0.523513   0.236542  -2.213 0.026957 *  
## stateKS                   -0.233095   0.234243  -0.995 0.319767    
## stateKY                   -0.306151   0.231794  -1.321 0.186670    
## stateLA                   -0.431032   0.246142  -1.751 0.080020 .  
## stateMA                   -0.580208   0.335755  -1.728 0.084076 .  
## stateMD                   -0.586431   0.290182  -2.021 0.043377 *  
## stateME                   -0.903596   0.320254  -2.822 0.004811 ** 
## stateMI                   -0.807118   0.238392  -3.386 0.000719 ***
## stateMN                   -0.699219   0.239880  -2.915 0.003584 ** 
## stateMO                   -0.042182   0.232447  -0.181 0.856010    
## stateMS                   -0.052603   0.241297  -0.218 0.827444    
## stateMT                   -0.118549   0.247883  -0.478 0.632510    
## stateNC                   -0.339926   0.235151  -1.446 0.148401    
## stateND                   -0.267373   0.252024  -1.061 0.288818    
## stateNE                   -0.299130   0.238567  -1.254 0.209988    
## stateNH                    0.042618   0.369792   0.115 0.908256    
## stateNJ                    0.428098   0.302377   1.416 0.156942    
## stateNM                   -0.121712   0.269542  -0.452 0.651624    
## stateNV                    0.053860   0.312719   0.172 0.863267    
## stateNY                   -0.650342   0.248134  -2.621 0.008812 ** 
## stateOH                   -0.933847   0.238912  -3.909 9.48e-05 ***
## stateOK                    0.195884   0.240305   0.815 0.415050    
## stateOR                   -0.415522   0.265983  -1.562 0.118341    
## statePA                   -0.695500   0.244983  -2.839 0.004556 ** 
## stateRI                   -1.382003   0.521445  -2.650 0.008083 ** 
## stateSC                   -0.483216   0.257156  -1.879 0.060329 .  
## stateSD                   -0.131633   0.243891  -0.540 0.589429    
## stateTN                   -0.366095   0.236791  -1.546 0.122191    
## stateTX                   -0.318384   0.222213  -1.433 0.152020    
## stateUT                    0.237381   0.277269   0.856 0.391987    
## stateVA                   -0.546742   0.228714  -2.391 0.016885 *  
## stateVT                   -0.736890   0.332195  -2.218 0.026611 *  
## stateWA                   -0.468405   0.264549  -1.771 0.076730 .  
## stateWI                   -0.504570   0.243075  -2.076 0.037998 *  
## stateWV                   -0.779520   0.250209  -3.115 0.001853 ** 
## stateWY                    0.045603   0.290648   0.157 0.875333    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9465 on 3068 degrees of freedom
## Multiple R-squared:  0.3598, Adjusted R-squared:  0.3488 
## F-statistic: 32.53 on 53 and 3068 DF,  p-value: < 2.2e-16

Institutional Dimension and Causality

cor.test(df$causality_log, df$FEMA_total_norm) # okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$FEMA_total_norm
## t = 6.0706, df = 3120, p-value = 1.428e-09
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.0732424 0.1425848
## sample estimates:
##      cor 
## 0.108045
cor.test(df$causality_log, df$number_research_institutions_norm) # okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$number_research_institutions_norm
## t = 15.677, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.2373922 0.3024354
## sample estimates:
##       cor 
## 0.2702221
cor.test(df$causality_log, df$employees_2010_norm) # okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$employees_2010_norm
## t = 21.638, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.3303357 0.3913509
## sample estimates:
##       cor 
## 0.3612299
X<-df%>%
  select(
         FEMA_total_norm,
         number_research_institutions_norm,
         employees_2010_norm) 
        
ggpairs(X)

inst_causality <- lm(causality_log~(FEMA_total_norm+
         number_research_institutions_norm+
         employees_2010_norm)+
                        log_pop_2010+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(inst_causality)
## 
## Call:
## lm(formula = causality_log ~ (FEMA_total_norm + number_research_institutions_norm + 
##     employees_2010_norm) + log_pop_2010 + numb_haz_log + state, 
##     data = df, na.rm = TRUE)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -4.2923 -0.6292 -0.1483  0.4561  5.1304 
## 
## Coefficients:
##                                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                       -2.413155   0.258468  -9.336  < 2e-16 ***
## FEMA_total_norm                   -0.009134   0.018773  -0.487 0.626609    
## number_research_institutions_norm  0.051785   0.023050   2.247 0.024734 *  
## employees_2010_norm                0.126506   0.025114   5.037 5.00e-07 ***
## log_pop_2010                       0.295237   0.017018  17.349  < 2e-16 ***
## numb_haz_log                       0.462217   0.040125  11.520  < 2e-16 ***
## stateAL                            0.605300   0.241935   2.502 0.012404 *  
## stateAR                           -0.087236   0.239698  -0.364 0.715927    
## stateAZ                            0.280609   0.325378   0.862 0.388529    
## stateCA                           -0.061911   0.249777  -0.248 0.804256    
## stateCO                            0.024544   0.242574   0.101 0.919414    
## stateCT                           -0.676806   0.398199  -1.700 0.089295 .  
## stateDE                            0.333477   0.586651   0.568 0.569776    
## stateFL                           -0.231205   0.244182  -0.947 0.343786    
## stateGA                           -0.481916   0.225615  -2.136 0.032757 *  
## stateIA                           -0.686545   0.233600  -2.939 0.003318 ** 
## stateID                           -0.601001   0.255214  -2.355 0.018591 *  
## stateIL                           -0.283184   0.232133  -1.220 0.222588    
## stateIN                           -0.535519   0.234158  -2.287 0.022264 *  
## stateKS                           -0.262757   0.230429  -1.140 0.254252    
## stateKY                           -0.297409   0.229045  -1.298 0.194221    
## stateLA                           -0.345987   0.244836  -1.413 0.157717    
## stateMA                           -0.660796   0.333731  -1.980 0.047790 *  
## stateMD                           -0.615009   0.288640  -2.131 0.033192 *  
## stateME                           -0.892986   0.318010  -2.808 0.005016 ** 
## stateMI                           -0.844667   0.236928  -3.565 0.000369 ***
## stateMN                           -0.761225   0.235012  -3.239 0.001212 ** 
## stateMO                            0.004474   0.229181   0.020 0.984427    
## stateMS                            0.072118   0.237784   0.303 0.761687    
## stateMT                           -0.030619   0.245997  -0.124 0.900951    
## stateNC                           -0.299207   0.233600  -1.281 0.200341    
## stateND                           -0.408611   0.248723  -1.643 0.100519    
## stateNE                           -0.338471   0.233213  -1.451 0.146788    
## stateNH                           -0.034395   0.367275  -0.094 0.925394    
## stateNJ                            0.435199   0.299845   1.451 0.146767    
## stateNM                           -0.128745   0.268899  -0.479 0.632127    
## stateNV                            0.003621   0.311811   0.012 0.990736    
## stateNY                           -0.771887   0.246297  -3.134 0.001741 ** 
## stateOH                           -0.951045   0.235977  -4.030 5.71e-05 ***
## stateOK                            0.206715   0.238162   0.868 0.385485    
## stateOR                           -0.415780   0.264112  -1.574 0.115531    
## statePA                           -0.727558   0.243132  -2.992 0.002790 ** 
## stateRI                           -1.437767   0.519450  -2.768 0.005676 ** 
## stateSC                           -0.405608   0.255468  -1.588 0.112457    
## stateSD                           -0.185151   0.241438  -0.767 0.443221    
## stateTN                           -0.338001   0.233689  -1.446 0.148176    
## stateTX                           -0.305937   0.220403  -1.388 0.165213    
## stateUT                            0.191574   0.275798   0.695 0.487349    
## stateVA                           -0.577794   0.227478  -2.540 0.011134 *  
## stateVT                           -0.726516   0.330428  -2.199 0.027973 *  
## stateWA                           -0.499204   0.262510  -1.902 0.057309 .  
## stateWI                           -0.540814   0.240376  -2.250 0.024528 *  
## stateWV                           -0.752151   0.247578  -3.038 0.002401 ** 
## stateWY                            0.078836   0.288802   0.273 0.784891    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9437 on 3068 degrees of freedom
## Multiple R-squared:  0.3637, Adjusted R-squared:  0.3527 
## F-statistic: 33.08 on 53 and 3068 DF,  p-value: < 2.2e-16

Environmental Dimension and Causality

df$air_quality_norm <- z_score(df$air_quality)
df$water_quality_norm <- z_score(df$water_quality)
df$built_quality_norm <- z_score(df$built_quality)
df$land_quality_norm <- z_score(df$land_quality)



cor.test(df$causality_log, df$air_quality_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$air_quality_norm
## t = 4.0565, df = 3120, p-value = 5.104e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.03744641 0.10723919
## sample estimates:
##        cor 
## 0.07243147
cor.test(df$causality_log, df$water_quality_norm)# no
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$water_quality_norm
## t = 2.2666, df = 3120, p-value = 0.02348
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.005473475 0.075518691
## sample estimates:
##       cor 
## 0.0405459
cor.test(df$causality_log, df$built_quality_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$built_quality_norm
## t = 5.8142, df = 3120, p-value = 6.709e-09
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.06870033 0.13810964
## sample estimates:
##      cor 
## 0.103531
cor.test(df$causality_log, df$land_quality_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$land_quality_norm
## t = -4.4465, df = 3120, p-value = 9.032e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1141170 -0.0443979
## sample estimates:
##         cor 
## -0.07935451
cor.test(df$causality_log, df$impervious_surface_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$causality_log and df$impervious_surface_norm
## t = 17.611, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.268441 0.332265
## sample estimates:
##       cor 
## 0.3006896
X<-df%>%
  select(
         air_quality_norm,
         built_quality_norm,
         land_quality_norm,
         impervious_surface_norm) 
        
ggpairs(X)

environ_causality <- lm(causality_log~(air_quality_norm+
         built_quality_norm+
           land_quality_norm+
         impervious_surface_norm)+
                        log_pop_2010+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(environ_causality)
## 
## Call:
## lm(formula = causality_log ~ (air_quality_norm + built_quality_norm + 
##     land_quality_norm + impervious_surface_norm) + log_pop_2010 + 
##     numb_haz_log + state, data = df, na.rm = TRUE)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -2.5264 -0.6262 -0.1492  0.4730  5.0667 
## 
## Coefficients:
##                          Estimate Std. Error t value Pr(>|t|)    
## (Intercept)             -3.128805   0.305801 -10.232  < 2e-16 ***
## air_quality_norm         0.004587   0.025763   0.178 0.858698    
## built_quality_norm      -0.042356   0.021495  -1.970 0.048873 *  
## land_quality_norm       -0.087124   0.023585  -3.694 0.000225 ***
## impervious_surface_norm  0.093890   0.023766   3.951 7.97e-05 ***
## log_pop_2010             0.333164   0.018294  18.212  < 2e-16 ***
## numb_haz_log             0.469179   0.040251  11.656  < 2e-16 ***
## stateAL                  0.936788   0.264838   3.537 0.000410 ***
## stateAR                  0.243191   0.261747   0.929 0.352907    
## stateAZ                  0.636297   0.332901   1.911 0.056050 .  
## stateCA                  0.376624   0.266540   1.413 0.157754    
## stateCO                  0.286186   0.255582   1.120 0.262911    
## stateCT                 -0.396541   0.413278  -0.960 0.337382    
## stateDE                  0.658968   0.601649   1.095 0.273485    
## stateFL                  0.057575   0.261884   0.220 0.826005    
## stateGA                 -0.160508   0.250695  -0.640 0.522056    
## stateIA                 -0.310997   0.264619  -1.175 0.239981    
## stateID                 -0.296389   0.271777  -1.091 0.275553    
## stateIL                  0.093991   0.264678   0.355 0.722527    
## stateIN                 -0.180911   0.268102  -0.675 0.499862    
## stateKS                  0.104826   0.257232   0.408 0.683658    
## stateKY                  0.023918   0.254639   0.094 0.925171    
## stateLA                 -0.054066   0.267946  -0.202 0.840103    
## stateMA                 -0.447070   0.353724  -1.264 0.206364    
## stateMD                 -0.317943   0.315546  -1.008 0.313728    
## stateME                 -0.676611   0.329226  -2.055 0.039948 *  
## stateMI                 -0.561405   0.261128  -2.150 0.031640 *  
## stateMN                 -0.413242   0.261537  -1.580 0.114198    
## stateMO                  0.338801   0.252896   1.340 0.180446    
## stateMS                  0.417459   0.262683   1.589 0.112115    
## stateMT                  0.278343   0.260041   1.070 0.284533    
## stateNC                  0.015290   0.258663   0.059 0.952867    
## stateND                 -0.006382   0.273938  -0.023 0.981414    
## stateNE                  0.048536   0.259849   0.187 0.851841    
## stateNH                  0.194271   0.377690   0.514 0.607033    
## stateNJ                  0.588955   0.330241   1.783 0.074619 .  
## stateNM                  0.099308   0.276148   0.360 0.719157    
## stateNV                  0.239457   0.316979   0.755 0.450046    
## stateNY                 -0.442532   0.273494  -1.618 0.105751    
## stateOH                 -0.619602   0.270262  -2.293 0.021939 *  
## stateOK                  0.539239   0.258324   2.087 0.036930 *  
## stateOR                 -0.157977   0.281634  -0.561 0.574886    
## statePA                 -0.443243   0.269789  -1.643 0.100501    
## stateRI                 -1.310872   0.536768  -2.442 0.014656 *  
## stateSC                 -0.095884   0.277542  -0.345 0.729760    
## stateSD                  0.196381   0.264479   0.743 0.457829    
## stateTN                 -0.019577   0.258912  -0.076 0.939732    
## stateTX                  0.031128   0.242073   0.129 0.897690    
## stateUT                  0.447044   0.285033   1.568 0.116892    
## stateVA                 -0.454541   0.252694  -1.799 0.072151 .  
## stateVT                 -0.463695   0.342936  -1.352 0.176433    
## stateWA                 -0.201018   0.278885  -0.721 0.471094    
## stateWI                 -0.217369   0.266290  -0.816 0.414399    
## stateWV                 -0.475318   0.270217  -1.759 0.078673 .  
## stateWY                  0.307465   0.298040   1.032 0.302331    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9436 on 3067 degrees of freedom
## Multiple R-squared:  0.3639, Adjusted R-squared:  0.3527 
## F-statistic: 32.49 on 54 and 3067 DF,  p-value: < 2.2e-16

Aggregated Casualties

X<-df%>%
  select(
         per_black_norm,
              per_hispanic_norm,
                       per_asian_norm,
         per_elderly_norm,
         per_young_dependent_norm,
         per_foreign_born_norm,
         per_female_hh_with_kids_under6_norm,
         per_rural_norm,
         
         per_no_carnorm,
         median_hh_income_2010_norm,
         average_hh_norm,
         per_lack_plumbing_norm,
         per_lack_kitchen_norm,
         per_mobile_home_norm,
         per_unemployed_norm,
         
         life_expectancy_2010_norm,
         per_disability_norm,
         per_nursingnorm,
         
         FEMA_total_norm,
         number_research_institutions_norm,
         employees_2010_norm,
         
         air_quality_norm,
         built_quality_norm,
         land_quality_norm,
         impervious_surface_norm
         
         ) 
        
ggpairs(X)

aggregated_causality <- lm(causality_log~(per_black_norm+
              per_hispanic_norm+
                       per_asian_norm+
         per_elderly_norm+
         per_young_dependent_norm+
         per_foreign_born_norm+
         per_female_hh_with_kids_under6_norm+
         per_rural_norm+
         
         per_no_carnorm+
         median_hh_income_2010_norm+
         per_lack_plumbing_norm+
         per_lack_kitchen_norm+
         per_mobile_home_norm+
         per_unemployed_norm+
         
         life_expectancy_2010_norm+
         per_disability_norm+
         per_nursingnorm+
         
         FEMA_total_norm+
         number_research_institutions_norm+
         employees_2010_norm+
         
         air_quality_norm+
         built_quality_norm+
         land_quality_norm+
         impervious_surface_norm)+
                        log_pop_2010+numb_haz_log+state,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(aggregated_causality)
## 
## Call:
## lm(formula = causality_log ~ (per_black_norm + per_hispanic_norm + 
##     per_asian_norm + per_elderly_norm + per_young_dependent_norm + 
##     per_foreign_born_norm + per_female_hh_with_kids_under6_norm + 
##     per_rural_norm + per_no_carnorm + median_hh_income_2010_norm + 
##     per_lack_plumbing_norm + per_lack_kitchen_norm + per_mobile_home_norm + 
##     per_unemployed_norm + life_expectancy_2010_norm + per_disability_norm + 
##     per_nursingnorm + FEMA_total_norm + number_research_institutions_norm + 
##     employees_2010_norm + air_quality_norm + built_quality_norm + 
##     land_quality_norm + impervious_surface_norm) + log_pop_2010 + 
##     numb_haz_log + state, data = df, na.rm = TRUE)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -3.5528 -0.6106 -0.1366  0.4578  5.1003 
## 
## Coefficients:
##                                       Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                         -3.0625214  0.4154828  -7.371 2.17e-13 ***
## per_black_norm                       0.0004696  0.0311553   0.015 0.987976    
## per_hispanic_norm                   -0.0983309  0.0565091  -1.740 0.081945 .  
## per_asian_norm                      -0.0995777  0.0373593  -2.665 0.007730 ** 
## per_elderly_norm                     0.0950344  0.0345889   2.748 0.006040 ** 
## per_young_dependent_norm             0.0314660  0.0261130   1.205 0.228299    
## per_foreign_born_norm                0.0439300  0.0399240   1.100 0.271270    
## per_female_hh_with_kids_under6_norm -0.1028686  0.0336469  -3.057 0.002253 ** 
## per_rural_norm                       0.0506493  0.0377458   1.342 0.179744    
## per_no_carnorm                      -0.0965842  0.0273829  -3.527 0.000426 ***
## median_hh_income_2010_norm           0.0929921  0.0391388   2.376 0.017565 *  
## per_lack_plumbing_norm              -0.0382499  0.0266424  -1.436 0.151197    
## per_lack_kitchen_norm                0.0214347  0.0265471   0.807 0.419485    
## per_mobile_home_norm                 0.0131740  0.0301217   0.437 0.661882    
## per_unemployed_norm                  0.0364521  0.0261123   1.396 0.162824    
## life_expectancy_2010_norm           -0.1137670  0.0368796  -3.085 0.002055 ** 
## per_disability_norm                  0.0207253  0.0182323   1.137 0.255738    
## per_nursingnorm                     -0.0410858  0.0216995  -1.893 0.058400 .  
## FEMA_total_norm                     -0.0144776  0.0187611  -0.772 0.440363    
## number_research_institutions_norm    0.0454613  0.0239859   1.895 0.058143 .  
## employees_2010_norm                  0.0965624  0.0270217   3.574 0.000358 ***
## air_quality_norm                     0.0093550  0.0255679   0.366 0.714473    
## built_quality_norm                  -0.0467454  0.0263271  -1.776 0.075905 .  
## land_quality_norm                   -0.0754805  0.0249947  -3.020 0.002550 ** 
## impervious_surface_norm              0.0688846  0.0280675   2.454 0.014174 *  
## log_pop_2010                         0.3560696  0.0287141  12.400  < 2e-16 ***
## numb_haz_log                         0.4510114  0.0403054  11.190  < 2e-16 ***
## stateAL                              0.5441721  0.3400826   1.600 0.109676    
## stateAR                             -0.1014560  0.3304953  -0.307 0.758878    
## stateAZ                              0.2241483  0.3861092   0.581 0.561600    
## stateCA                             -0.0359253  0.3248043  -0.111 0.911936    
## stateCO                              0.0709653  0.3200670   0.222 0.824547    
## stateCT                             -0.7712391  0.4535581  -1.700 0.089154 .  
## stateDE                              0.3281609  0.6293719   0.521 0.602119    
## stateFL                             -0.3385487  0.3397182  -0.997 0.319059    
## stateGA                             -0.4749372  0.3263562  -1.455 0.145697    
## stateIA                             -0.4894617  0.3297612  -1.484 0.137835    
## stateID                             -0.5746052  0.3364834  -1.708 0.087798 .  
## stateIL                             -0.1675275  0.3313880  -0.506 0.613221    
## stateIN                             -0.4669845  0.3347149  -1.395 0.163066    
## stateKS                             -0.1664458  0.3226202  -0.516 0.605949    
## stateKY                             -0.3119655  0.3243034  -0.962 0.336148    
## stateLA                             -0.3194780  0.3382321  -0.945 0.344962    
## stateMA                             -0.7937193  0.4023040  -1.973 0.048593 *  
## stateMD                             -0.6687714  0.3693692  -1.811 0.070305 .  
## stateME                             -0.9257410  0.3815376  -2.426 0.015310 *  
## stateMI                             -0.8263552  0.3319314  -2.490 0.012844 *  
## stateMN                             -0.5281740  0.3260035  -1.620 0.105304    
## stateMO                              0.0196158  0.3226684   0.061 0.951529    
## stateMS                              0.0746482  0.3393083   0.220 0.825885    
## stateMT                             -0.0641846  0.3236026  -0.198 0.842789    
## stateNC                             -0.3327600  0.3332557  -0.999 0.318110    
## stateND                             -0.3008809  0.3383800  -0.889 0.373976    
## stateNE                             -0.2259633  0.3284260  -0.688 0.491493    
## stateNH                             -0.1070901  0.4230112  -0.253 0.800161    
## stateNJ                              0.2638799  0.3788736   0.696 0.486178    
## stateNM                              0.0588487  0.3484481   0.169 0.865896    
## stateNV                             -0.2145717  0.3732028  -0.575 0.565370    
## stateNY                             -0.7402062  0.3371469  -2.196 0.028203 *  
## stateOH                             -0.9086967  0.3380668  -2.688 0.007229 ** 
## stateOK                              0.1454400  0.3259183   0.446 0.655451    
## stateOR                             -0.5330327  0.3441471  -1.549 0.121521    
## statePA                             -0.7484568  0.3383862  -2.212 0.027052 *  
## stateRI                             -1.6210832  0.5720037  -2.834 0.004627 ** 
## stateSC                             -0.4413443  0.3512313  -1.257 0.209008    
## stateSD                             -0.1062191  0.3278206  -0.324 0.745948    
## stateTN                             -0.4190310  0.3314591  -1.264 0.206254    
## stateTX                             -0.2226069  0.3165023  -0.703 0.481901    
## stateUT                              0.1319714  0.3507282   0.376 0.706736    
## stateVA                             -0.7234541  0.3242803  -2.231 0.025757 *  
## stateVT                             -0.6771925  0.3917275  -1.729 0.083958 .  
## stateWA                             -0.4886484  0.3390219  -1.441 0.149589    
## stateWI                             -0.4414980  0.3309294  -1.334 0.182266    
## stateWV                             -0.7668092  0.3407214  -2.251 0.024485 *  
## stateWY                              0.0094247  0.3540759   0.027 0.978766    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 0.9325 on 3047 degrees of freedom
## Multiple R-squared:  0.3829, Adjusted R-squared:  0.3679 
## F-statistic: 25.55 on 74 and 3047 DF,  p-value: < 2.2e-16

PROPERTY DAMAGE

Social Dimension and Prop Damage

### social dimension  VS property dmg
cor.test(df$prop_dmg_log, df$per_white_norm) ## okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_white_norm
## t = -7.5933, df = 3120, p-value = 4.094e-14
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1689850 -0.1000961
## sample estimates:
##        cor 
## -0.1347033
cor.test(df$prop_dmg_log, df$per_black_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_black_norm
## t = 9.3579, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1309090 0.1991563
## sample estimates:
##       cor 
## 0.1652305
cor.test(df$prop_dmg_log, df$per_hispanic_norm)##not statistically signif
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_hispanic_norm
## t = 1.709, df = 3120, p-value = 0.08754
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.004502708  0.065592169
## sample estimates:
##        cor 
## 0.03058233
cor.test(df$prop_dmg_log, df$per_asian_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_asian_norm
## t = 7.5287, df = 3120, p-value = 6.667e-14
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.09896134 0.16787139
## sample estimates:
##       cor 
## 0.1335778
cor.test(df$prop_dmg_log, df$per_american_indian_norm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_american_indian_norm
## t = -5.8868, df = 3120, p-value = 4.357e-09
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.13937711 -0.06998647
## sample estimates:
##        cor 
## -0.1048094
cor.test(df$prop_dmg_log, df$per_other_races_norm)#okay remove due to correlation
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_other_races_norm
## t = 3.7727, df = 3120, p-value = 0.0001645
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.03238429 0.10222649
## sample estimates:
##        cor 
## 0.06738794
cor.test(df$prop_dmg_log, df$per_POC_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_POC_norm
## t = 6.4655, df = 3120, p-value = 1.168e-10
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08022629 0.14946024
## sample estimates:
##       cor 
## 0.1149829
cor.test(df$prop_dmg_log, df$per_elderly_norm) ##okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_elderly_norm
## t = -8.2802, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.1807866 -0.1121330
## sample estimates:
##        cor 
## -0.1466364
cor.test(df$prop_dmg_log, df$per_young_dependent_norm)  #okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_young_dependent_norm
## t = 3.7636, df = 3120, p-value = 0.0001706
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.03222182 0.10206555
## sample estimates:
##        cor 
## 0.06722604
cor.test(df$prop_dmg_log, df$per_noenglish_norm)# ##okay remove due to correlation
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_noenglish_norm
## t = 2.6899, df = 3120, p-value = 0.007185
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.01304371 0.08304199
## sample estimates:
##        cor 
## 0.04810191
cor.test(df$prop_dmg_log, df$per_foreign_born_norm)##okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_foreign_born_norm
## t = 7.2815, df = 3120, p-value = 4.159e-13
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.0946150 0.1636045
## sample estimates:
##       cor 
## 0.1292662
cor.test(df$prop_dmg_log, df$per_female_hh_with_kids_under6_norm)## okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_female_hh_with_kids_under6_norm
## t = 5.8064, df = 3120, p-value = 7.025e-09
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.06856248 0.13797377
## sample estimates:
##      cor 
## 0.103394
cor.test(df$prop_dmg_log, df$per_female_hh_with_kids_under18_norm)##okay remove due to correlation
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_female_hh_with_kids_under18_norm
## t = 11.364, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1654444 0.2328194
## sample estimates:
##       cor 
## 0.1993675
cor.test(df$prop_dmg_log, df$per_rural_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_rural_norm
## t = -14.911, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2903661 -0.2248674
## sample estimates:
##        cor 
## -0.2579131
cor.test(df$prop_dmg_log, df$per_per_no_school_completed_norm) ## okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_per_no_school_completed_norm
## t = 2.7448, df = 3120, p-value = 0.006089
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.01402519 0.08401680
## sample estimates:
##        cor 
## 0.04908125
X<-df%>%
  select(              
         per_asian_norm,
         per_black_norm,
         per_elderly_norm,
         per_american_indian_norm,
         per_young_dependent_norm,
         per_foreign_born_norm,
         per_female_hh_with_kids_under6_norm,
         per_rural_norm,
         per_per_no_school_completed_norm) 
        

ggpairs(X)

social_dmg <- lm(prop_dmg_log~(
         per_asian_norm+
         per_black_norm+
         per_elderly_norm+
         per_american_indian_norm+
         per_young_dependent_norm+
         per_foreign_born_norm+
         per_female_hh_with_kids_under6_norm+
         per_rural_norm+
         per_per_no_school_completed_norm)+
                        log_pop_2010+numb_haz_log+state+log_median_house_value,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(social_dmg)
## 
## Call:
## lm(formula = prop_dmg_log ~ (per_asian_norm + per_black_norm + 
##     per_elderly_norm + per_american_indian_norm + per_young_dependent_norm + 
##     per_foreign_born_norm + per_female_hh_with_kids_under6_norm + 
##     per_rural_norm + per_per_no_school_completed_norm) + log_pop_2010 + 
##     numb_haz_log + state + log_median_house_value, data = df, 
##     na.rm = TRUE)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -12.0900  -1.1256  -0.0443   1.1216   9.2681 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                         10.489661   2.049253   5.119 3.27e-07 ***
## per_asian_norm                      -0.155950   0.081291  -1.918 0.055151 .  
## per_black_norm                       0.165038   0.071876   2.296 0.021734 *  
## per_elderly_norm                    -0.012405   0.063920  -0.194 0.846129    
## per_american_indian_norm            -0.100713   0.057971  -1.737 0.082434 .  
## per_young_dependent_norm            -0.113314   0.059921  -1.891 0.058710 .  
## per_foreign_born_norm               -0.006645   0.073678  -0.090 0.928138    
## per_female_hh_with_kids_under6_norm -0.113868   0.068042  -1.674 0.094331 .  
## per_rural_norm                       0.068825   0.080044   0.860 0.389946    
## per_per_no_school_completed_norm    -0.132366   0.058825  -2.250 0.024510 *  
## log_pop_2010                         0.545980   0.061178   8.924  < 2e-16 ***
## numb_haz_log                         4.054440   0.097702  41.498  < 2e-16 ***
## stateAL                             -2.243474   0.684998  -3.275 0.001068 ** 
## stateAR                             -2.723213   0.671282  -4.057 5.10e-05 ***
## stateAZ                             -2.478766   0.838275  -2.957 0.003130 ** 
## stateCA                             -1.870360   0.661035  -2.829 0.004693 ** 
## stateCO                             -3.057660   0.657095  -4.653 3.41e-06 ***
## stateCT                             -2.970608   1.012602  -2.934 0.003375 ** 
## stateDE                             -4.085775   1.452818  -2.812 0.004950 ** 
## stateFL                             -1.828311   0.682125  -2.680 0.007395 ** 
## stateGA                             -3.380056   0.642308  -5.262 1.52e-07 ***
## stateIA                             -3.015463   0.653693  -4.613 4.13e-06 ***
## stateID                             -1.424453   0.691311  -2.061 0.039434 *  
## stateIL                             -3.511758   0.652734  -5.380 8.01e-08 ***
## stateIN                             -3.874137   0.657014  -5.897 4.12e-09 ***
## stateKS                             -3.754701   0.647850  -5.796 7.50e-09 ***
## stateKY                             -3.096471   0.647971  -4.779 1.85e-06 ***
## stateLA                             -1.631308   0.685102  -2.381 0.017321 *  
## stateMA                             -2.990505   0.864955  -3.457 0.000553 ***
## stateMD                             -2.814590   0.765883  -3.675 0.000242 ***
## stateME                             -2.583511   0.839055  -3.079 0.002095 ** 
## stateMI                             -2.259916   0.658580  -3.431 0.000608 ***
## stateMN                             -2.931052   0.646135  -4.536 5.95e-06 ***
## stateMO                             -3.604649   0.645000  -5.589 2.49e-08 ***
## stateMS                             -3.183825   0.685668  -4.643 3.57e-06 ***
## stateMT                             -3.830943   0.656220  -5.838 5.84e-09 ***
## stateNC                             -2.320633   0.654786  -3.544 0.000400 ***
## stateND                             -1.736491   0.674750  -2.574 0.010113 *  
## stateNE                             -1.849594   0.652667  -2.834 0.004629 ** 
## stateNH                             -2.301186   0.943663  -2.439 0.014802 *  
## stateNJ                             -1.053263   0.784582  -1.342 0.179549    
## stateNM                             -2.548459   0.708585  -3.597 0.000328 ***
## stateNV                             -2.221226   0.804065  -2.762 0.005770 ** 
## stateNY                             -2.812197   0.676956  -4.154 3.35e-05 ***
## stateOH                             -2.956402   0.662890  -4.460 8.50e-06 ***
## stateOK                             -2.946696   0.639636  -4.607 4.26e-06 ***
## stateOR                             -2.905091   0.706200  -4.114 4.00e-05 ***
## statePA                             -3.092761   0.681352  -4.539 5.87e-06 ***
## stateRI                             -3.843613   1.294671  -2.969 0.003013 ** 
## stateSC                             -4.096573   0.716886  -5.714 1.21e-08 ***
## stateSD                             -2.254991   0.641916  -3.513 0.000450 ***
## stateTN                             -2.877716   0.656150  -4.386 1.19e-05 ***
## stateTX                             -2.416725   0.633748  -3.813 0.000140 ***
## stateUT                             -2.241698   0.741389  -3.024 0.002518 ** 
## stateVA                             -3.165002   0.634650  -4.987 6.47e-07 ***
## stateVT                             -1.486150   0.859581  -1.729 0.083924 .  
## stateWA                             -1.921341   0.695851  -2.761 0.005794 ** 
## stateWI                             -3.099242   0.658276  -4.708 2.61e-06 ***
## stateWV                             -2.825021   0.689393  -4.098 4.28e-05 ***
## stateWY                             -4.088274   0.760205  -5.378 8.10e-08 ***
## log_median_house_value              -0.461388   0.173314  -2.662 0.007805 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.276 on 3060 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.5501, Adjusted R-squared:  0.5412 
## F-statistic: 62.35 on 60 and 3060 DF,  p-value: < 2.2e-16

Economic Dimension and damage

cor.test(df$prop_dmg_log, df$per_below_poverty_norm) # no
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_below_poverty_norm
## t = 0.13411, df = 3120, p-value = 0.8933
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.03268204  0.03747797
## sample estimates:
##         cor 
## 0.002400922
cor.test(df$prop_dmg_log, df$median_hh_income_2010_norm)##
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$median_hh_income_2010_norm
## t = 5.1036, df = 3120, p-value = 3.532e-07
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.05608901 0.12566926
## sample estimates:
##        cor 
## 0.09099018
cor.test(df$prop_dmg_log, df$per_rent_norm)# 
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_rent_norm
## t = 4.0743, df = 3120, p-value = 4.73e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.03776475 0.10755430
## sample estimates:
##        cor 
## 0.07274858
cor.test(df$prop_dmg_log, df$per_no_carnorm)# removed bc highly correlated with rent
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_no_carnorm
## t = -2.3376, df = 3120, p-value = 0.01947
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.07677986 -0.00674195
## sample estimates:
##         cor 
## -0.04181227
cor.test(df$prop_dmg_log, df$per_college_or_higher_norm)#
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_college_or_higher_norm
## t = 6.1813, df = 3120, p-value = 7.185e-10
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.07520068 0.14451333
## sample estimates:
##       cor 
## 0.1099907
cor.test(df$prop_dmg_log, df$average_hh_norm)##
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$average_hh_norm
## t = 6.5403, df = 3120, p-value = 7.148e-11
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08154805 0.15076072
## sample estimates:
##       cor 
## 0.1162956
cor.test(df$prop_dmg_log, df$per_lack_plumbing_norm)## no
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_lack_plumbing_norm
## t = -0.95465, df = 3120, p-value = 0.3398
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.05213744  0.01800251
## sample estimates:
##         cor 
## -0.01708849
cor.test(df$prop_dmg_log, df$per_lack_kitchen_norm) #
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_lack_kitchen_norm
## t = -10.108, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.2118239 -0.1438855
## sample estimates:
##        cor 
## -0.1780669
cor.test(df$prop_dmg_log, df$per_mobile_home_norm)#no
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_mobile_home_norm
## t = -1.8258, df = 3120, p-value = 0.06797
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.067672720  0.002412903
## sample estimates:
##         cor 
## -0.03267007
cor.test(df$prop_dmg_log, df$per_unemployed_norm)## 
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_unemployed_norm
## t = 6.3885, df = 3120, p-value = 1.925e-10
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.0788651 0.1481207
## sample estimates:
##       cor 
## 0.1136309
X<-df%>%
  select(median_hh_income_2010_norm,
         per_rent_norm,
         average_hh_norm,
         per_college_or_higher_norm,
         per_lack_kitchen_norm,
         per_unemployed_norm) 
        
ggpairs(X)

econ_dmg <- lm(prop_dmg_log~(median_hh_income_2010_norm+
         per_rent_norm+
         average_hh_norm+
         per_college_or_higher_norm+
         per_lack_kitchen_norm+
         per_unemployed_norm)+
                        log_pop_2010+numb_haz_log+state+log_median_house_value,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(econ_dmg)
## 
## Call:
## lm(formula = prop_dmg_log ~ (median_hh_income_2010_norm + per_rent_norm + 
##     average_hh_norm + per_college_or_higher_norm + per_lack_kitchen_norm + 
##     per_unemployed_norm) + log_pop_2010 + numb_haz_log + state + 
##     log_median_house_value, data = df, na.rm = TRUE)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -12.1033  -1.1040  -0.0606   1.1528   9.3162 
## 
## Coefficients:
##                            Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                 8.67010    2.62919   3.298 0.000986 ***
## median_hh_income_2010_norm  0.04630    0.10015   0.462 0.643913    
## per_rent_norm              -0.14213    0.05862  -2.425 0.015386 *  
## average_hh_norm            -0.18974    0.06303  -3.010 0.002630 ** 
## per_college_or_higher_norm -0.10285    0.08517  -1.208 0.227302    
## per_lack_kitchen_norm      -0.06753    0.05844  -1.156 0.247953    
## per_unemployed_norm        -0.01984    0.06101  -0.325 0.745014    
## log_pop_2010                0.48937    0.05031   9.726  < 2e-16 ***
## numb_haz_log                4.07817    0.09743  41.857  < 2e-16 ***
## stateAL                    -1.58750    0.69258  -2.292 0.021964 *  
## stateAR                    -2.20431    0.68242  -3.230 0.001250 ** 
## stateAZ                    -2.20430    0.85237  -2.586 0.009753 ** 
## stateCA                    -1.69975    0.67456  -2.520 0.011794 *  
## stateCO                    -2.68122    0.68175  -3.933 8.58e-05 ***
## stateCT                    -2.54037    1.01238  -2.509 0.012149 *  
## stateDE                    -3.70183    1.45946  -2.536 0.011248 *  
## stateFL                    -1.42087    0.69495  -2.045 0.040984 *  
## stateGA                    -2.73592    0.65068  -4.205 2.69e-05 ***
## stateIA                    -2.75328    0.68335  -4.029 5.74e-05 ***
## stateID                    -1.04792    0.72423  -1.447 0.148018    
## stateIL                    -3.15709    0.67533  -4.675 3.07e-06 ***
## stateIN                    -3.46607    0.67334  -5.148 2.81e-07 ***
## stateKS                    -3.34231    0.67585  -4.945 8.01e-07 ***
## stateKY                    -2.68486    0.66487  -4.038 5.52e-05 ***
## stateLA                    -1.01788    0.68847  -1.478 0.139388    
## stateMA                    -2.63882    0.86487  -3.051 0.002299 ** 
## stateMD                    -2.33793    0.76400  -3.060 0.002232 ** 
## stateME                    -2.15469    0.85035  -2.534 0.011330 *  
## stateMI                    -1.90687    0.68828  -2.771 0.005631 ** 
## stateMN                    -2.75374    0.67726  -4.066 4.90e-05 ***
## stateMO                    -3.19050    0.66482  -4.799 1.67e-06 ***
## stateMS                    -2.36200    0.69228  -3.412 0.000653 ***
## stateMT                    -3.44940    0.68927  -5.004 5.92e-07 ***
## stateNC                    -1.76402    0.67100  -2.629 0.008608 ** 
## stateND                    -1.42553    0.72143  -1.976 0.048246 *  
## stateNE                    -1.41973    0.68230  -2.081 0.037535 *  
## stateNH                    -1.84218    0.95476  -1.929 0.053764 .  
## stateNJ                    -0.67811    0.78076  -0.869 0.385172    
## stateNM                    -2.39639    0.73757  -3.249 0.001171 ** 
## stateNV                    -2.02413    0.81510  -2.483 0.013070 *  
## stateNY                    -2.33718    0.68782  -3.398 0.000688 ***
## stateOH                    -2.51343    0.67244  -3.738 0.000189 ***
## stateOK                    -2.63630    0.68379  -3.855 0.000118 ***
## stateOR                    -2.53443    0.72449  -3.498 0.000475 ***
## statePA                    -2.60923    0.68818  -3.791 0.000153 ***
## stateRI                    -3.49250    1.29587  -2.695 0.007075 ** 
## stateSC                    -3.34704    0.71740  -4.665 3.21e-06 ***
## stateSD                    -1.98080    0.70030  -2.829 0.004707 ** 
## stateTN                    -2.42557    0.67460  -3.596 0.000329 ***
## stateTX                    -1.97323    0.64060  -3.080 0.002086 ** 
## stateUT                    -1.73860    0.77180  -2.253 0.024352 *  
## stateVA                    -2.67632    0.64241  -4.166 3.19e-05 ***
## stateVT                    -1.07010    0.88115  -1.214 0.224675    
## stateWA                    -1.69522    0.72297  -2.345 0.019101 *  
## stateWI                    -2.79027    0.68191  -4.092 4.39e-05 ***
## stateWV                    -2.41664    0.70810  -3.413 0.000651 ***
## stateWY                    -3.80937    0.77555  -4.912 9.50e-07 ***
## log_median_house_value     -0.29487    0.21710  -1.358 0.174491    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.28 on 3063 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.5479, Adjusted R-squared:  0.5395 
## F-statistic: 65.13 on 57 and 3063 DF,  p-value: < 2.2e-16

Health Dimension and damage

cor.test(df$prop_dmg_log, df$life_expectancy_2010_norm) # highly correlated
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$life_expectancy_2010_norm
## t = -2.2964, df = 3120, p-value = 0.02172
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.076048243 -0.006006069
## sample estimates:
##         cor 
## -0.04107762
cor.test(df$prop_dmg_log, df$per_hypertension_2009_norm)# highly correlated
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_hypertension_2009_norm
## t = 3.7473, df = 3120, p-value = 0.000182
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.03193164 0.10177809
## sample estimates:
##        cor 
## 0.06693687
cor.test(df$prop_dmg_log, df$per_heart_disease_35_65_norm)# highly correlated
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_heart_disease_35_65_norm
## t = 2.9439, df = 3120, p-value = 0.003265
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.01758337 0.08754968
## sample estimates:
##        cor 
## 0.05263111
cor.test(df$prop_dmg_log, df$per_heart_disease_65_more_norm)# 
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_heart_disease_65_more_norm
## t = 2.729, df = 3120, p-value = 0.006388
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.01374206 0.08373560
## sample estimates:
##        cor 
## 0.04879874
cor.test(df$prop_dmg_log, df$per_stroke_35_65_norm) # 
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_stroke_35_65_norm
## t = 6.5168, df = 3120, p-value = 8.344e-11
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08113299 0.15035237
## sample estimates:
##       cor 
## 0.1158834
cor.test(df$prop_dmg_log, df$per_stroke_65_more_norm) #no
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_stroke_65_more_norm
## t = 0.43374, df = 3120, p-value = 0.6645
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.02732260  0.04283359
## sample estimates:
##         cor 
## 0.007765046
cor.test(df$prop_dmg_log, df$per_diabetes_2010_norm)# 
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_diabetes_2010_norm
## t = 4.6924, df = 3120, p-value = 2.816e-06
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.04877624 0.11844558
## sample estimates:
##        cor 
## 0.08371321
cor.test(df$prop_dmg_log, df$per_disability_norm)# no
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_disability_norm
## t = 0.015924, df = 3120, p-value = 0.9873
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.03479548  0.03536493
## sample estimates:
##          cor 
## 0.0002850765
cor.test(df$prop_dmg_log, df$per_nursingnorm)# okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$per_nursingnorm
## t = -5.4141, df = 3120, p-value = 6.627e-08
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.13111181 -0.06160362
## sample estimates:
##         cor 
## -0.09647533
X<-df%>%
  select(
         per_diabetes_2010_norm,
         per_nursingnorm) 
        
ggpairs(X)

health_dmg <- lm(prop_dmg_log~(per_diabetes_2010_norm+
         per_nursingnorm)+
                        log_pop_2010+numb_haz_log+state+log_median_house_value,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(health_dmg)
## 
## Call:
## lm(formula = prop_dmg_log ~ (per_diabetes_2010_norm + per_nursingnorm) + 
##     log_pop_2010 + numb_haz_log + state + log_median_house_value, 
##     data = df, na.rm = TRUE)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -11.9869  -1.1317  -0.0787   1.1672   9.6285 
## 
## Coefficients:
##                        Estimate Std. Error t value Pr(>|t|)    
## (Intercept)            10.82750    1.93101   5.607 2.24e-08 ***
## per_diabetes_2010_norm -0.15927    0.07622  -2.090 0.036740 *  
## per_nursingnorm         0.05581    0.04802   1.162 0.245212    
## log_pop_2010            0.43095    0.04530   9.513  < 2e-16 ***
## numb_haz_log            4.09653    0.09750  42.016  < 2e-16 ***
## stateAL                -0.60635    0.60840  -0.997 0.319026    
## stateAR                -1.43887    0.60017  -2.397 0.016570 *  
## stateAZ                -1.45088    0.79257  -1.831 0.067257 .  
## stateCA                -1.01336    0.60979  -1.662 0.096650 .  
## stateCO                -1.99921    0.58888  -3.395 0.000695 ***
## stateCT                -1.60035    0.96639  -1.656 0.097821 .  
## stateDE                -2.61791    1.42312  -1.840 0.065930 .  
## stateFL                -0.34718    0.59839  -0.580 0.561836    
## stateGA                -1.89444    0.56356  -3.362 0.000785 ***
## stateIA                -1.99757    0.58118  -3.437 0.000596 ***
## stateID                -0.42741    0.62221  -0.687 0.492187    
## stateIL                -2.31048    0.57605  -4.011 6.19e-05 ***
## stateIN                -2.60898    0.57944  -4.503 6.96e-06 ***
## stateKS                -2.73264    0.57693  -4.736 2.27e-06 ***
## stateKY                -1.81461    0.57168  -3.174 0.001518 ** 
## stateLA                -0.10812    0.60867  -0.178 0.859024    
## stateMA                -1.78175    0.81046  -2.198 0.027992 *  
## stateMD                -1.34327    0.70617  -1.902 0.057240 .  
## stateME                -1.22443    0.77414  -1.582 0.113828    
## stateMI                -0.93983    0.58209  -1.615 0.106504    
## stateMN                -1.94786    0.57835  -3.368 0.000767 ***
## stateMO                -2.40478    0.56970  -4.221 2.50e-05 ***
## stateMS                -1.49731    0.60332  -2.482 0.013125 *  
## stateMT                -2.81570    0.60153  -4.681 2.98e-06 ***
## stateNC                -0.82436    0.57791  -1.426 0.153839    
## stateND                -0.74268    0.61864  -1.201 0.230036    
## stateNE                -0.86915    0.58363  -1.489 0.136534    
## stateNH                -0.94506    0.89124  -1.060 0.289051    
## stateNJ                 0.18162    0.73285   0.248 0.804288    
## stateNM                -1.59764    0.65724  -2.431 0.015122 *  
## stateNV                -1.22488    0.75568  -1.621 0.105143    
## stateNY                -1.51031    0.60270  -2.506 0.012265 *  
## stateOH                -1.60997    0.58633  -2.746 0.006071 ** 
## stateOK                -1.88018    0.59361  -3.167 0.001553 ** 
## stateOR                -1.76388    0.64101  -2.752 0.005963 ** 
## statePA                -1.66527    0.59875  -2.781 0.005448 ** 
## stateRI                -2.68570    1.25817  -2.135 0.032872 *  
## stateSC                -2.38803    0.63633  -3.753 0.000178 ***
## stateSD                -1.43097    0.59696  -2.397 0.016584 *  
## stateTN                -1.50662    0.58076  -2.594 0.009526 ** 
## stateTX                -1.31138    0.55205  -2.375 0.017587 *  
## stateUT                -1.32330    0.66866  -1.979 0.047902 *  
## stateVA                -1.72924    0.56011  -3.087 0.002038 ** 
## stateVT                -0.27610    0.80133  -0.345 0.730454    
## stateWA                -0.89779    0.63819  -1.407 0.159594    
## stateWI                -1.92961    0.58852  -3.279 0.001054 ** 
## stateWV                -1.44001    0.61587  -2.338 0.019441 *  
## stateWY                -3.05843    0.70111  -4.362 1.33e-05 ***
## log_median_house_value -0.49882    0.17427  -2.862 0.004234 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.285 on 3067 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.5453, Adjusted R-squared:  0.5375 
## F-statistic: 69.41 on 53 and 3067 DF,  p-value: < 2.2e-16

Institutional Dimension and damage

cor.test(df$prop_dmg_log, df$FEMA_total_norm) # okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$FEMA_total_norm
## t = 3.9876, df = 3120, p-value = 6.827e-05
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.03621916 0.10602425
## sample estimates:
##        cor 
## 0.07120889
cor.test(df$prop_dmg_log, df$number_research_institutions_norm) # okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$number_research_institutions_norm
## t = 8.0537, df = 3120, p-value = 1.132e-15
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1081695 0.1769028
## sample estimates:
##       cor 
## 0.1427082
cor.test(df$prop_dmg_log, df$employees_2010_norm) # okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$employees_2010_norm
## t = 11.898, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1745366 0.2416552
## sample estimates:
##       cor 
## 0.2083412
X<-df%>%
  select(
         FEMA_total_norm,
         number_research_institutions_norm,
         employees_2010_norm) 
        
ggpairs(X)

inst_dmg <- lm(prop_dmg_log~(FEMA_total_norm+
         number_research_institutions_norm+
         employees_2010_norm)+
                        log_pop_2010+numb_haz_log+state+log_median_house_value,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(inst_dmg)
## 
## Call:
## lm(formula = prop_dmg_log ~ (FEMA_total_norm + number_research_institutions_norm + 
##     employees_2010_norm) + log_pop_2010 + numb_haz_log + state + 
##     log_median_house_value, data = df, na.rm = TRUE)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -11.9665  -1.1185  -0.0688   1.1478   9.6016 
## 
## Coefficients:
##                                    Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                        8.782201   1.645493   5.337 1.01e-07 ***
## FEMA_total_norm                    0.003421   0.045747   0.075 0.940394    
## number_research_institutions_norm  0.012054   0.055881   0.216 0.829224    
## employees_2010_norm                0.018667   0.060923   0.306 0.759324    
## log_pop_2010                       0.382230   0.047584   8.033 1.35e-15 ***
## numb_haz_log                       4.113760   0.097409  42.232  < 2e-16 ***
## stateAL                           -0.674164   0.599096  -1.125 0.260549    
## stateAR                           -1.377543   0.595084  -2.315 0.020686 *  
## stateAZ                           -1.473426   0.792433  -1.859 0.063071 .  
## stateCA                           -1.113159   0.607310  -1.833 0.066909 .  
## stateCO                           -1.893169   0.588094  -3.219 0.001299 ** 
## stateCT                           -1.546376   0.965386  -1.602 0.109298    
## stateDE                           -2.653506   1.422544  -1.865 0.062231 .  
## stateFL                           -0.411691   0.595694  -0.691 0.489548    
## stateGA                           -2.008553   0.554338  -3.623 0.000296 ***
## stateIA                           -1.765867   0.573952  -3.077 0.002112 ** 
## stateID                           -0.364015   0.621410  -0.586 0.558060    
## stateIL                           -2.160469   0.572098  -3.776 0.000162 ***
## stateIN                           -2.505496   0.575584  -4.353 1.39e-05 ***
## stateKS                           -2.521351   0.569834  -4.425 9.99e-06 ***
## stateKY                           -1.809775   0.566516  -3.195 0.001415 ** 
## stateLA                           -0.200771   0.604815  -0.332 0.739947    
## stateMA                           -1.791807   0.809815  -2.213 0.026998 *  
## stateMD                           -1.412833   0.699882  -2.019 0.043608 *  
## stateME                           -1.080403   0.773389  -1.397 0.162523    
## stateMI                           -0.833616   0.580580  -1.436 0.151152    
## stateMN                           -1.726749   0.572223  -3.018 0.002569 ** 
## stateMO                           -2.289181   0.564406  -4.056 5.12e-05 ***
## stateMS                           -1.634025   0.591282  -2.764 0.005752 ** 
## stateMT                           -2.646800   0.598457  -4.423 1.01e-05 ***
## stateNC                           -0.851038   0.571981  -1.488 0.136886    
## stateND                           -0.518472   0.612756  -0.846 0.397545    
## stateNE                           -0.595364   0.573572  -1.038 0.299356    
## stateNH                           -0.827172   0.890557  -0.929 0.353053    
## stateNJ                            0.156077   0.727101   0.215 0.830049    
## stateNM                           -1.621433   0.656740  -2.469 0.013607 *  
## stateNV                           -1.184761   0.756190  -1.567 0.117276    
## stateNY                           -1.429924   0.602299  -2.374 0.017653 *  
## stateOH                           -1.538139   0.580129  -2.651 0.008058 ** 
## stateOK                           -1.822283   0.591076  -3.083 0.002068 ** 
## stateOR                           -1.710757   0.640477  -2.671 0.007601 ** 
## statePA                           -1.547626   0.597129  -2.592 0.009593 ** 
## stateRI                           -2.612200   1.259477  -2.074 0.038159 *  
## stateSC                           -2.485473   0.629184  -3.950 7.98e-05 ***
## stateSD                           -1.255794   0.593644  -2.115 0.034477 *  
## stateTN                           -1.491170   0.574691  -2.595 0.009511 ** 
## stateTX                           -1.286253   0.548193  -2.346 0.019022 *  
## stateUT                           -1.248906   0.668751  -1.868 0.061924 .  
## stateVA                           -1.820644   0.551790  -3.300 0.000980 ***
## stateVT                           -0.136167   0.801151  -0.170 0.865050    
## stateWA                           -0.858134   0.636594  -1.348 0.177756    
## stateWI                           -1.763141   0.585391  -3.012 0.002617 ** 
## stateWV                           -1.395697   0.611057  -2.284 0.022436 *  
## stateWY                           -2.931114   0.700297  -4.186 2.93e-05 ***
## log_median_house_value            -0.287235   0.143889  -1.996 0.045997 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.288 on 3066 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.5444, Adjusted R-squared:  0.5364 
## F-statistic: 67.84 on 54 and 3066 DF,  p-value: < 2.2e-16

Environmental Dimension and damage

df$air_quality_norm <- z_score(df$air_quality)
df$water_quality_norm <- z_score(df$water_quality)
df$built_quality_norm <- z_score(df$built_quality)
df$land_quality_norm <- z_score(df$land_quality)



cor.test(df$prop_dmg_log, df$air_quality_norm)#okay 
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$air_quality_norm
## t = 6.8604, df = 3120, p-value = 8.246e-12
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.08719789 0.15631692
## sample estimates:
##       cor 
## 0.1219052
cor.test(df$prop_dmg_log, df$water_quality_norm)# no
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$water_quality_norm
## t = 1.6693, df = 3120, p-value = 0.09516
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  -0.005214242  0.064883646
## sample estimates:
##        cor 
## 0.02987143
cor.test(df$prop_dmg_log, df$built_quality_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$built_quality_norm
## t = 9.0977, df = 3120, p-value < 2.2e-16
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1263896 0.1947390
## sample estimates:
##      cor 
## 0.160757
cor.test(df$prop_dmg_log, df$land_quality_norm)#
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$land_quality_norm
## t = 2.3181, df = 3120, p-value = 0.02051
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.006394862 0.076434792
## sample estimates:
##        cor 
## 0.04146577
cor.test(df$prop_dmg_log, df$impervious_surface_norm)#okay
## 
##  Pearson's product-moment correlation
## 
## data:  df$prop_dmg_log and df$impervious_surface_norm
## t = 7.9858, df = 3120, p-value = 1.945e-15
## alternative hypothesis: true correlation is not equal to 0
## 95 percent confidence interval:
##  0.1069805 0.1757373
## sample estimates:
##       cor 
## 0.1415296
X<-df%>%
  select(air_quality_norm,
         built_quality_norm,
         land_quality_norm,
         impervious_surface_norm) 
        
ggpairs(X)

env_dmg <- lm(prop_dmg_log~(air_quality_norm+
         built_quality_norm+
         land_quality_norm+
         impervious_surface_norm)+
                        log_pop_2010+numb_haz_log+state+log_median_house_value,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(env_dmg)
## 
## Call:
## lm(formula = prop_dmg_log ~ (air_quality_norm + built_quality_norm + 
##     land_quality_norm + impervious_surface_norm) + log_pop_2010 + 
##     numb_haz_log + state + log_median_house_value, data = df, 
##     na.rm = TRUE)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -12.0305  -1.1435  -0.0797   1.1525   9.6132 
## 
## Coefficients:
##                           Estimate Std. Error t value Pr(>|t|)    
## (Intercept)              8.0876497  1.6793371   4.816 1.54e-06 ***
## air_quality_norm        -0.0005011  0.0624259  -0.008 0.993596    
## built_quality_norm       0.0553946  0.0520755   1.064 0.287532    
## land_quality_norm        0.0143429  0.0577933   0.248 0.804015    
## impervious_surface_norm -0.1014320  0.0575833  -1.761 0.078256 .  
## log_pop_2010             0.4192817  0.0502310   8.347  < 2e-16 ***
## numb_haz_log             4.1023444  0.0976251  42.021  < 2e-16 ***
## stateAL                 -0.8271502  0.6482978  -1.276 0.202095    
## stateAR                 -1.4791512  0.6413128  -2.306 0.021152 *  
## stateAZ                 -1.6493718  0.8084579  -2.040 0.041421 *  
## stateCA                 -1.2266014  0.6497832  -1.888 0.059159 .  
## stateCO                 -1.9344103  0.6198406  -3.121 0.001820 ** 
## stateCT                 -1.6363792  1.0014200  -1.634 0.102349    
## stateDE                 -2.7717869  1.4574922  -1.902 0.057297 .  
## stateFL                 -0.5179052  0.6353437  -0.815 0.415045    
## stateGA                 -2.1238349  0.6102874  -3.480 0.000508 ***
## stateIA                 -1.8252193  0.6432227  -2.838 0.004575 ** 
## stateID                 -0.4462891  0.6606119  -0.676 0.499365    
## stateIL                 -2.2502347  0.6447842  -3.490 0.000490 ***
## stateIN                 -2.6274175  0.6522134  -4.028 5.75e-05 ***
## stateKS                 -2.5389159  0.6276650  -4.045 5.36e-05 ***
## stateKY                 -1.9288776  0.6225209  -3.098 0.001963 ** 
## stateLA                 -0.3074064  0.6543928  -0.470 0.638561    
## stateMA                 -1.7262244  0.8588887  -2.010 0.044536 *  
## stateMD                 -1.5365786  0.7656108  -2.007 0.044838 *  
## stateME                 -1.1992550  0.7983809  -1.502 0.133172    
## stateMI                 -0.9160989  0.6348986  -1.443 0.149149    
## stateMN                 -1.8133690  0.6337741  -2.861 0.004249 ** 
## stateMO                 -2.3807861  0.6162853  -3.863 0.000114 ***
## stateMS                 -1.7541654  0.6441861  -2.723 0.006504 ** 
## stateMT                 -2.6833412  0.6302526  -4.258 2.13e-05 ***
## stateNC                 -0.9843947  0.6285477  -1.566 0.117419    
## stateND                 -0.5252597  0.6672732  -0.787 0.431241    
## stateNE                 -0.6048033  0.6321800  -0.957 0.338797    
## stateNH                 -0.9562233  0.9149765  -1.045 0.296069    
## stateNJ                  0.1810045  0.8009067   0.226 0.821217    
## stateNM                 -1.7136819  0.6715604  -2.552 0.010765 *  
## stateNV                 -1.2726560  0.7678700  -1.657 0.097544 .  
## stateNY                 -1.4861345  0.6643551  -2.237 0.025361 *  
## stateOH                 -1.6639246  0.6579025  -2.529 0.011484 *  
## stateOK                 -1.9117156  0.6329688  -3.020 0.002547 ** 
## stateOR                 -1.7952636  0.6823820  -2.631 0.008559 ** 
## statePA                 -1.6671200  0.6570319  -2.537 0.011219 *  
## stateRI                 -2.5402802  1.3010841  -1.952 0.050978 .  
## stateSC                 -2.6268602  0.6772533  -3.879 0.000107 ***
## stateSD                 -1.2758750  0.6436566  -1.982 0.047543 *  
## stateTN                 -1.6231278  0.6307898  -2.573 0.010124 *  
## stateTX                 -1.3720426  0.5939512  -2.310 0.020953 *  
## stateUT                 -1.3415005  0.6905623  -1.943 0.052153 .  
## stateVA                 -1.8303909  0.6121452  -2.990 0.002811 ** 
## stateVT                 -0.2316488  0.8309745  -0.279 0.780442    
## stateWA                 -0.9853443  0.6757190  -1.458 0.144883    
## stateWI                 -1.8779134  0.6454518  -2.909 0.003647 ** 
## stateWV                 -1.5291596  0.6610360  -2.313 0.020773 *  
## stateWY                 -2.9856004  0.7220863  -4.135 3.65e-05 ***
## log_median_house_value  -0.2513098  0.1452408  -1.730 0.083678 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.286 on 3065 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.5453, Adjusted R-squared:  0.5371 
## F-statistic: 66.83 on 55 and 3065 DF,  p-value: < 2.2e-16

Vulnerability using Dmg

X<-df%>%
  select(
        per_asian_norm,
         per_black_norm,
         per_elderly_norm,
         per_american_indian_norm,
         per_young_dependent_norm,
         per_foreign_born_norm,
         per_female_hh_with_kids_under6_norm,
         per_rural_norm,
         per_per_no_school_completed_norm,
         median_hh_income_2010_norm,
         per_rent_norm,
         average_hh_norm,
         per_college_or_higher_norm,
         per_lack_kitchen_norm,
         per_unemployed_norm,
         per_diabetes_2010_norm,
         per_nursingnorm,
                        FEMA_total_norm,
         number_research_institutions_norm,
         employees_2010_norm,
                        
                    air_quality_norm,
         built_quality_norm,
         land_quality_norm,
         impervious_surface_norm
         
         
         ) 
        
ggpairs(X)

model_dmg <- lm(prop_dmg_log~
                        (per_asian_norm + 
    per_black_norm + per_elderly_norm + per_american_indian_norm + 
    per_young_dependent_norm + per_foreign_born_norm + per_female_hh_with_kids_under6_norm + 
    per_rural_norm + per_per_no_school_completed_norm)+
                        
                        (median_hh_income_2010_norm+
         per_rent_norm+
           average_hh_norm+
         per_college_or_higher_norm+
         per_lack_kitchen_norm+
         per_unemployed_norm)+
                        (per_diabetes_2010_norm+
         per_nursingnorm)+
                        
                        (FEMA_total_norm+
         number_research_institutions_norm+
         employees_2010_norm)+
                    (air_quality_norm+
         built_quality_norm+
         land_quality_norm+
         impervious_surface_norm)+
                        log_pop_2010+numb_haz_log+state+log_median_house_value    
                        
                        
                        
                        ,data=df, na.rm=TRUE)
## Warning: In lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
##  extra argument 'na.rm' will be disregarded
summary(model_dmg)
## 
## Call:
## lm(formula = prop_dmg_log ~ (per_asian_norm + per_black_norm + 
##     per_elderly_norm + per_american_indian_norm + per_young_dependent_norm + 
##     per_foreign_born_norm + per_female_hh_with_kids_under6_norm + 
##     per_rural_norm + per_per_no_school_completed_norm) + (median_hh_income_2010_norm + 
##     per_rent_norm + average_hh_norm + per_college_or_higher_norm + 
##     per_lack_kitchen_norm + per_unemployed_norm) + (per_diabetes_2010_norm + 
##     per_nursingnorm) + (FEMA_total_norm + number_research_institutions_norm + 
##     employees_2010_norm) + (air_quality_norm + built_quality_norm + 
##     land_quality_norm + impervious_surface_norm) + log_pop_2010 + 
##     numb_haz_log + state + log_median_house_value, data = df, 
##     na.rm = TRUE)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -12.040  -1.136  -0.069   1.141   9.273 
## 
## Coefficients:
##                                      Estimate Std. Error t value Pr(>|t|)    
## (Intercept)                         10.736026   2.830725   3.793 0.000152 ***
## per_asian_norm                      -0.145703   0.088715  -1.642 0.100616    
## per_black_norm                       0.250827   0.093837   2.673 0.007558 ** 
## per_elderly_norm                    -0.048092   0.089920  -0.535 0.592802    
## per_american_indian_norm            -0.016554   0.071608  -0.231 0.817197    
## per_young_dependent_norm            -0.101082   0.072448  -1.395 0.163047    
## per_foreign_born_norm                0.050701   0.082958   0.611 0.541134    
## per_female_hh_with_kids_under6_norm -0.067535   0.089810  -0.752 0.452121    
## per_rural_norm                      -0.029672   0.091606  -0.324 0.746024    
## per_per_no_school_completed_norm    -0.108975   0.062508  -1.743 0.081367 .  
## median_hh_income_2010_norm          -0.028317   0.120276  -0.235 0.813886    
## per_rent_norm                       -0.053046   0.090533  -0.586 0.557968    
## average_hh_norm                     -0.124471   0.116687  -1.067 0.286186    
## per_college_or_higher_norm          -0.062472   0.094449  -0.661 0.508380    
## per_lack_kitchen_norm               -0.073335   0.062537  -1.173 0.241025    
## per_unemployed_norm                 -0.027950   0.067595  -0.413 0.679275    
## per_diabetes_2010_norm              -0.117060   0.134977  -0.867 0.385867    
## per_nursingnorm                      0.078365   0.053370   1.468 0.142114    
## FEMA_total_norm                      0.014194   0.046215   0.307 0.758771    
## number_research_institutions_norm    0.022741   0.060545   0.376 0.707243    
## employees_2010_norm                  0.054859   0.066452   0.826 0.409130    
## air_quality_norm                     0.006442   0.062474   0.103 0.917881    
## built_quality_norm                   0.132875   0.069915   1.901 0.057458 .  
## land_quality_norm                    0.012206   0.063609   0.192 0.847838    
## impervious_surface_norm             -0.096894   0.070300  -1.378 0.168213    
## log_pop_2010                         0.488611   0.074653   6.545 6.95e-11 ***
## numb_haz_log                         4.047829   0.098352  41.157  < 2e-16 ***
## stateAL                             -2.512743   0.852361  -2.948 0.003223 ** 
## stateAR                             -2.956583   0.817414  -3.617 0.000303 ***
## stateAZ                             -2.772147   0.924182  -3.000 0.002726 ** 
## stateCA                             -2.101026   0.782949  -2.683 0.007325 ** 
## stateCO                             -3.234512   0.773977  -4.179 3.01e-05 ***
## stateCT                             -3.153110   1.118044  -2.820 0.004830 ** 
## stateDE                             -4.345514   1.543795  -2.815 0.004912 ** 
## stateFL                             -2.055335   0.835452  -2.460 0.013943 *  
## stateGA                             -3.612730   0.811839  -4.450 8.89e-06 ***
## stateIA                             -3.284601   0.815143  -4.029 5.73e-05 ***
## stateID                             -1.569912   0.822792  -1.908 0.056481 .  
## stateIL                             -3.799993   0.826527  -4.598 4.45e-06 ***
## stateIN                             -4.076426   0.837453  -4.868 1.19e-06 ***
## stateKS                             -3.925624   0.801713  -4.897 1.03e-06 ***
## stateKY                             -3.265712   0.832036  -3.925 8.87e-05 ***
## stateLA                             -1.881808   0.842469  -2.234 0.025576 *  
## stateMA                             -3.106096   1.000743  -3.104 0.001928 ** 
## stateMD                             -3.044350   0.921394  -3.304 0.000964 ***
## stateME                             -2.711926   0.944226  -2.872 0.004106 ** 
## stateMI                             -2.414794   0.820610  -2.943 0.003278 ** 
## stateMN                             -3.257180   0.794031  -4.102 4.20e-05 ***
## stateMO                             -3.809988   0.804174  -4.738 2.26e-06 ***
## stateMS                             -3.404965   0.861459  -3.953 7.91e-05 ***
## stateMT                             -4.058219   0.773988  -5.243 1.69e-07 ***
## stateNC                             -2.582407   0.821402  -3.144 0.001683 ** 
## stateND                             -1.969912   0.832320  -2.367 0.018006 *  
## stateNE                             -2.082812   0.799174  -2.606 0.009200 ** 
## stateNH                             -2.479454   1.046185  -2.370 0.017850 *  
## stateNJ                             -1.144062   0.937620  -1.220 0.222492    
## stateNM                             -2.751933   0.830178  -3.315 0.000928 ***
## stateNV                             -2.545736   0.877685  -2.901 0.003752 ** 
## stateNY                             -3.003765   0.833433  -3.604 0.000318 ***
## stateOH                             -3.161208   0.851813  -3.711 0.000210 ***
## stateOK                             -3.172936   0.800229  -3.965 7.51e-05 ***
## stateOR                             -3.052699   0.829036  -3.682 0.000235 ***
## statePA                             -3.261015   0.834428  -3.908 9.51e-05 ***
## stateRI                             -3.976602   1.404080  -2.832 0.004654 ** 
## stateSC                             -4.339054   0.869987  -4.987 6.46e-07 ***
## stateSD                             -2.463970   0.797840  -3.088 0.002031 ** 
## stateTN                             -3.084062   0.832223  -3.706 0.000214 ***
## stateTX                             -2.566472   0.787931  -3.257 0.001137 ** 
## stateUT                             -2.286320   0.858621  -2.663 0.007791 ** 
## stateVA                             -3.347902   0.817524  -4.095 4.33e-05 ***
## stateVT                             -1.646035   0.971395  -1.695 0.090271 .  
## stateWA                             -2.194724   0.823547  -2.665 0.007740 ** 
## stateWI                             -3.379769   0.805679  -4.195 2.81e-05 ***
## stateWV                             -3.075683   0.863986  -3.560 0.000377 ***
## stateWY                             -4.298130   0.850040  -5.056 4.53e-07 ***
## log_median_house_value              -0.413063   0.242152  -1.706 0.088147 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 2.276 on 3045 degrees of freedom
##   (1 observation deleted due to missingness)
## Multiple R-squared:  0.5521, Adjusted R-squared:  0.5411 
## F-statistic: 50.05 on 75 and 3045 DF,  p-value: < 2.2e-16